//#pragma once
#ifndef __MYSTDIO_H__
#define __MYSTDIO_H__

#include <string.h>

#define SIZE 1024
#define FLUSH_NOW 0
#define FLUSH_LINE 1
#define FLUSH_ALL 2

typedef struct IO_FILE{
  int fileno;
  int flag;
  //char inbuffer[SIZE];
  //int in_pos;
  char outbuffer[SIZE];//输出缓冲区
  int out_pos;//缓冲区被使用了多少，由pos定
}_FILE;

_FILE* _fopen(const char* filename,const char* flag);
int _fwrite(_FILE* fp,const char* s,int len);
void _fclose(_FILE* fp);





#endif
